package com.yingxin.yx.framework.commons.id;


import java.util.Date;


/**
 * @author fanchao
 * snowflake
 */
public class IdHelper {

    /**
     * 雪花
     *
     * @return
     */
    public static String snowflakeId() {
        return String.valueOf(Snowflake.getSnowflake().nextId());
    }

    public static String leftOfMin(Date date) {
        return String.valueOf(SnowflakePartition.leftOfMin(date));
    }

    public static String rightOfMin(Date date) {
        return String.valueOf(SnowflakePartition.rightOfMin(date));
    }


    public static String leftOfDay(Date date) {
        return String.valueOf(SnowflakePartition.leftOfDay(date));
    }

    public static String rightOfDay(Date date) {
        return String.valueOf(SnowflakePartition.rightOfDay(date));
    }

}
